<?php defined('_JEXEC') or die('Restricted access'); ?>

<script language="javascript" type="text/javascript">
function submitbutton(submit) {
	if (submit == 'save' || submit == 'apply') {
		if (document.adminForm.title.value == '') {
			alert("Hay nhap title cho tin tuc.");
		} else if (document.adminForm.link_url.value == '') {
			alert("Hay nhap lien ket toi trang.");
		} else {
			submitform(submit);
		}
	} else {
		submitform(submit);
	}
}
</script>

<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Details' ); ?></legend>

		<table class="admintable">		
                <tr>
			<td width="100" align="right" class="key">
				<label for="title">
					<?php echo JText::_( 'Title' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="title" id="title" size="32" maxlength="250" value="<?php echo $this->news->title;?>" />
			</td>
		</tr>
                <tr>
			<td width="100" align="right" class="key">
				<label for="link_url">
					<?php echo JText::_( 'Link' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="link_url" id="link_url" size="32" maxlength="250" value="<?php echo $this->news->link_url;?>" />
			</td>
		</tr>                             
                <tr>
			<td width="100" align="right" class="key">
				<label for="public">
					<?php echo JText::_( 'Public' ); ?>:
				</label>
			</td>
			<td>				
                                <select class="text_area" name="public" id="public">
                                    <option value ="0">False</option>
                                    <option value ="1">True</option>
                                </select>
			</td>
		</tr>

	</table>
	</fieldset>
</div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_render" />
<input type="hidden" name="id" value="<?php echo $this->news->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="news" />
</form>
